package com.hykc.auth.common.exceptions;

import com.aopuxun.common.enums.ExceptionEnum;
import lombok.Getter;

@Getter
public class DdException extends RuntimeException {
    private int status;

    public DdException(ExceptionEnum em) {
        super(em.getMessage());
        this.status = em.getStatus();
    }

    public DdException(ExceptionEnum em, Throwable cause) {
        super(em.getMessage(), cause);
        this.status = em.getStatus();
    }

    public DdException(int status, String errorMsg) {
        super(errorMsg);
        this.status = status;
    }
}
